import java.util.Iterator;
import java.util.concurrent.ConcurrentSkipListSet;

class CellSet implements Iterable<CellClass> {
	private ConcurrentSkipListSet<CellClass> group;
	
	public CellSet() {
		this.group = new ConcurrentSkipListSet<CellClass>();
	}
	
	public void add(CellClass c) {
		this.group.add(c); 
	}
	
	
	public void remove(CellClass c) {
		this.group.remove(c); 
	}
	
	public Iterator<CellClass> iterator() {
		return this.group.iterator();
	}
	
	public String toString() {
		String result = "";
		for(CellClass c : this.group ) {
			result = result.concat(c.toString());
		}
		return result;
	}
	
	public boolean containsDup(CellClass c1) {
		for(CellClass c2 : this.group ) {
			if(c1.equals(c2)) {
				return true;
			}
		}
		return false;
	}
	
	public int size() {
		return this.group.size();
	}
	
	public void addAll(CellSet set) {
		this.group.addAll(set.getSet());
	}
	
	public void removeAll(CellSet set) {
		this.group.removeAll(set.getSet());
	}
	
	public ConcurrentSkipListSet<CellClass> getSet() {
		return group;
	}
	
	public boolean isEmpty() {
		return group.isEmpty();
	}

	public void clear() {
		group.clear();		
	}
}

